import { getAction, deleteAction, putAction, postAction, httpAction, downFile, downFilePost } from '@/api/manage'
const serviceName = '/fz-fengdu-tong-guan-ju'

//首页
const statisticsTotal = (params) => getAction(`${serviceName}/homepage/statisticsTotal`, params)
const blockingRatio = (params) => getAction(`${serviceName}/homepage/blockingRatio`, params)
const blockingTrend = (params) => getAction(`${serviceName}/homepage/blockingTrend`, params)
const feedbackTrend = (params) => getAction(`${serviceName}/homepage/feedbackTrend`, params)

//封堵速报
const reportList = (params) => getAction(`${serviceName}/quickReport/list`, params)
const reportAdd = (params) => postAction(`${serviceName}/quickReport/add`, params)
const reportAddBatch = (params) => postAction(`${serviceName}/quickReport/addBatch`, params)

// 封堵指令分发策略
const fd_db_strategyList = (params) => getAction(`${serviceName}/distributeStrategy/list`, params)
const fd_db_strategyAdd = (params) => postAction(`${serviceName}/distributeStrategy/add`, params)
const fd_db_onAndOff = (params) => putAction(`${serviceName}/distributeStrategy/edit`, params)
const fd_db_queryById = (params) => getAction(`${serviceName}/distributeStrategy/queryById`, params)
const fd_db_deleteBatch = (params) => deleteAction(`${serviceName}/distributeStrategy/deleteBatch`, params)

// 封堵指令分发(手工)
const fd_db_detailList = (params) => postAction(`${serviceName}/manualDistribute/detailList`, params)
const fd_db_distributeBatch = (params) => postAction(`${serviceName}/manualDistribute/distributeBatch`, params)
const fd_db_manualDistributeList = (params) => getAction(`${serviceName}/manualDistribute/list`, params)

// 封堵指令反馈策略
const fd_fb_strategyList = (params) => getAction(`${serviceName}/feedbackStrategy/list`, params)
const fd_fb_strategyAdd = (params) => postAction(`${serviceName}/feedbackStrategy/add`, params)
const fd_fb_onAndOff = (params) => putAction(`${serviceName}/feedbackStrategy/edit`, params)
const fd_fb_queryById = (params) => getAction(`${serviceName}/feedbackStrategy/queryById`, params)
const fd_fb_deleteBatch = (params) => deleteAction(`${serviceName}/feedbackStrategy/deleteBatch`, params)

// 封堵指令反馈表(手工)
const fd_fb_addOrUpdate = (params) => postAction(`${serviceName}/feedbackManual/addOrUpdate`, params)
const fd_fb_detailList = (params) => getAction(`${serviceName}/feedbackManual/detailList`, params)
const fd_fb_extract = (params) => getAction(`${serviceName}/feedbackManual/extract`, params)
const fd_fb_feedbackPush = (params) => putAction(`${serviceName}/feedbackManual/feedbackPush`, params)
const fd_fb_getFeedbackNumber = (params) => getAction(`${serviceName}/feedbackManual/getFeedbackNumber`, params)
const fd_fb_list = (params) => getAction(`${serviceName}/feedbackManual/list`, params)

// 日志
const receiveLog = (params) => getAction(`${serviceName}/receiveLog/list`, params)
const distributeLog = (params) => getAction(`${serviceName}/distributeLog/list`, params)
const feedbackLog = (params) => getAction(`${serviceName}/feedbackLog/list`, params)
const unsealDistributeLog = (params) => getAction(`${serviceName}/unsealDistributeLog/list`, params)
const unsealFeedbackLog = (params) => getAction(`${serviceName}/unsealFeedbackLog/list`, params)
// 导出
const receiveLogOut = (params) => downFile(`${serviceName}/receiveLog/exportXls`, params)
const distributeLogOut = (params) => downFile(`${serviceName}/distributeLog/exportXls`, params)
const feedbackLogOut = (params) => downFile(`${serviceName}/feedbackLog/exportXls`, params)
const unsealDistributeLogOut = (params) => downFile(`${serviceName}/unsealDistributeLog/exportXls`, params)
const unsealFeedbackLogOut = (params) => downFile(`${serviceName}/unsealFeedbackLog/exportXls`, params)

export {
  blockingRatio,
  blockingTrend,
  feedbackTrend,
  statisticsTotal,
  reportList,
  reportAdd,
  reportAddBatch,
  fd_db_detailList,
  fd_db_distributeBatch,
  fd_db_manualDistributeList,
  fd_db_strategyList,
  fd_db_strategyAdd,
  fd_db_onAndOff,
  fd_db_queryById,
  fd_db_deleteBatch,
  fd_fb_addOrUpdate,
  fd_fb_detailList,
  fd_fb_extract,
  fd_fb_feedbackPush,
  fd_fb_getFeedbackNumber,
  fd_fb_list,
  fd_fb_strategyList,
  fd_fb_strategyAdd,
  fd_fb_onAndOff,
  fd_fb_queryById,
  fd_fb_deleteBatch,
  receiveLog,
  distributeLog,
  feedbackLog,
  unsealDistributeLog,
  unsealFeedbackLog,
  receiveLogOut,
  distributeLogOut,
  feedbackLogOut,
  unsealDistributeLogOut,
  unsealFeedbackLogOut,
}
